﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ppEndereco.aspx.cs" Inherits="Protegidos_Pessoas_DadosPessoa__popup_ppEndereco" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<%@ Register TagPrefix="uc1" TagName="HeadTag"  Src="~/_includes/HeadTag.ascx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <!-- Includes -->
    <uc1:HeadTag ID="HeadTag1" runat="server" />
    <title>Cadastro de Endereço</title>
</head>
<body>
    <form id="form1" runat="server">
    
        <script type="text/javascript">
            function CloseAndRebind(args)
            {
                GetRadWindow().Close();
                GetRadWindow().BrowserWindow.refreshGrid(args);
            }
    		
            function GetRadWindow()
            {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz as well)
    				
                return oWindow;
            }

            function CancelEdit()
            {
                GetRadWindow().Close();		
            }
        </script>
        
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
                
        <table width="99%" class="textoCZ_12B" align="right">
            <tr>
                <td>
                    <div class="subTitulo_pagina">Dados do Endereço</div>
                    <div class="espaco"></div>
                </td>
            </tr>
            <tr>
                <td>
                
                    <table class="textoCZ_12B">
                        <tr>
                            <td style="width: 120px">Tipo Logradouro:</td>
                            <td>
                                <telerik:RadComboBox ID="rcbTipoLogradouro" runat="server" Skin="Telerik" Width="150px" >
                                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                </telerik:RadComboBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator9" ControlToValidate="rcbTipoLogradouro"
                                    InitialValue=" -- Selecione -- " ErrorMessage="*" ValidationGroup="1" />
                            </td>
                        </tr>
                        <tr>
                            <td>Logradouro:</td>
                            <td>
                                <asp:TextBox ID="txtLogradouro" runat="server" Width="300px"></asp:TextBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="txtLogradouro"
                                    InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                            </td>
                        </tr>
                        <tr>
                            <td>Numero:</td>
                            <td>
                                <asp:TextBox ID="txtNumero" runat="server" Width="50px"></asp:TextBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator1" ControlToValidate="txtNumero"
                                    InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                            </td>
                        </tr>
                        <tr>
                            <td>Complemento:</td>
                            <td>
                                <asp:TextBox ID="txtComplemento" runat="server" Width="300px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>Cep:</td>
                            <td>
                                <asp:TextBox ID="txtCep" runat="server" Width="100px"></asp:TextBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator4" ControlToValidate="txtCep"
                                    InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                            </td>
                        </tr>
                        <tr>
                            <td>Bairro:</td>
                            <td>
                                <asp:TextBox ID="txtBairro" runat="server" Width="300px"></asp:TextBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator5" ControlToValidate="txtBairro"
                                    InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                            </td>
                        </tr>
                        <tr>
                            <td>Estado:</td>
                            <td>
                                <telerik:RadComboBox ID="rcbEstado" runat="server" Skin="Telerik" Width="105px" 
                                    AutoPostBack="true" OnSelectedIndexChanged="rcbEstado_SelectedIndexChanged">
                                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                </telerik:RadComboBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator6" ControlToValidate="rcbEstado"
                                    InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                            </td>
                        </tr>
                        <tr>
                            <td>Cidade:</td>
                            <td>
                                <telerik:RadComboBox ID="rcbCidade" runat="server" Skin="Telerik" Width="240px" >
                                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                </telerik:RadComboBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator10" ControlToValidate="rcbCidade"
                                    InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                            </td>
                        </tr>
                        <tr>
                            <td>Status:</td>
                            <td>
                                <telerik:RadComboBox ID="rcbStatus" runat="server" Skin="Telerik" Width="150px" >
                                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                </telerik:RadComboBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator7" ControlToValidate="rcbStatus"
                                    InitialValue=" -- Selecione -- " ErrorMessage="*" ValidationGroup="1" />
                            </td>
                        </tr>
                        <tr>
                            <td>Tipo Endereço:</td>
                            <td>
                                <telerik:RadComboBox ID="rcbTipoEndereco" runat="server" Skin="Telerik" Width="200px" >
                                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                </telerik:RadComboBox>
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator8" ControlToValidate="rcbTipoEndereco"
                                    InitialValue=" -- Selecione -- " ErrorMessage="*" ValidationGroup="1" />
                            </td>
                        </tr>
                    </table>
                
                </td>
            </tr>
            <%--<tr>
                <td>
                    <div class="subTitulo_pagina">Comprovante</div>
                    <div class="espaco"></div>
                </td>
            </tr>
            <tr>
                <td>
                
                    <table class="textoCZ_12B">
                        <tr>
                            <td>Comprovante:</td>
                            <td>
                                
                            </td>
                        </tr>
                    </table>
                    
                </td>
            </tr>--%>
            <tr>
                <td align="right">
                <br />
                <asp:Button ID="btnSalvar" runat="server" Text="Salvar" Width="110px" 
                        ValidationGroup="1" CausesValidation="true" onclick="btnSalvar_Click"/>&nbsp;&nbsp;
                <asp:Button ID="btnLimpar" runat="server" Text="Limpar" Width="110px" 
                        onclick="btnLimpar_Click" />
                </td>
            </tr>
        </table>
        
    </form>
</body>
</html>
